package com.hongruan.dao.impl;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.hongruan.dao.FormRecordDao;

@Repository
public class FormRecordDaoImpl extends GenericDaoHibernateImpl<Object, Long> implements FormRecordDao {
	public FormRecordDaoImpl() {
		super(Object.class);
	}
	
	public boolean dataFlag(String hql,String nsrsbh,String xgrq,String czrydm){
		Query query = this.getCurrentSession().createQuery(hql);
		query.setString("nsrsbh", nsrsbh);
		query.setString("xgrq", xgrq);
		query.setString("czrydm", czrydm);
		List<Object> list = query.list();
		if(list.size() > 0){
			return true;
		}
		return false;
	}
}
